using HardcoreGame.Content.Projectiles.Javelin;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace HardcoreGame.Content.Items.Weapons.Ranged.Javelin
{
    public class GoldJavelin : ModItem
    {
        public override void SetStaticDefaults()
        {
            Item.ResearchUnlockCount = 99;
        }

        public override void SetDefaults()
        {
            Item.shootSpeed = 10f;
            Item.damage = 17;
            Item.knockBack = 5f;
            Item.useStyle = 1;
            Item.useAnimation = 29;
            Item.useTime = 29;
            Item.width = 30;
            Item.height = 30;
            Item.maxStack = Item.CommonMaxStack;
            Item.rare = 0;

            Item.consumable = true;
            Item.noUseGraphic = true;
            Item.noMelee = true;
            Item.autoReuse = true;
            Item.DamageType = DamageClass.Ranged;

            Item.UseSound = SoundID.Item1;
            Item.value = 120;
            Item.shoot = ModContent.ProjectileType<GoldJavelinProj>();
        }

        public override void AddRecipes()
        {
            Recipe recipe = CreateRecipe(50);
            recipe.AddIngredient(ItemID.GoldBar, 1);
            recipe.AddTile(TileID.Anvils);
            recipe.Register();
        }
    }
}
